package LC27;

public class LC2643 {
    public static int[] rowAndMaximumOnes(int[][] mat) {
        int length = mat.length;
        int index = 0;
        int num = 0;
        for (int i = 0; i < length; i++) {
            int[] ints = mat[i];
            int c = 0;
            for (int s : ints) {
                if (s == 1) {
                    c++;
                }
            }
            if (c > num) {
                index = i;
                num = c;
            }
        }
        return new int[]{index, num};
    }

    public static void main(String[] args) {
        int[][] ints = new int[2][2];
        ints[0] = new int[]{0, 1};
        ints[1] = new int[]{1, 0};
        System.out.println(rowAndMaximumOnes(ints));
    }
}
